<?php

class Application_Model_DbTable_Share extends Zend_Db_Table_Abstract
{

    protected $_name = 'txy_share_items';
	
    public function addNewShare($data){
    	$this->insert($data);
    }
    
    public function getUncheckedItemsList(){
    	$res=$this->fetchAll('is_approve=0','add_time desc');
    	return $res->toArray();
    }
    
	public function isRepeat($num_iid){
    	$res=$this->fetchRow("numiid='".$num_iid."'");
    	if($res){
    		return false;
    	}
    	return true;
    }
    
    public function updateItem($data, $numiid){
    	$this->update($data, "numiid='".$numiid."'");
    }

}

